﻿using System.IO;
using Styx;
using Styx.Helpers;
using System.ComponentModel;
using DefaultValue = Styx.Helpers.DefaultValueAttribute;
using Styx.Common;
using Styx.Common.Helpers;

namespace KingWoW
{
    public class CombatRogueSettings : Settings
    {
        public static CombatRogueSettings Instance = new CombatRogueSettings();

        public string path_name = Path.Combine(Styx.Common.Utilities.AssemblyDirectory, string.Format(@"KingWOWCurrentSettings/CombatRogue/CombatRogue-Settings-{0}.xml", StyxWoW.Me.Name));

        public CombatRogueSettings()
            : base(Path.Combine(Styx.Common.Utilities.AssemblyDirectory, string.Format(@"KingWOWCurrentSettings/CombatRogue/CombatRogue-Settings-{0}.xml", StyxWoW.Me.Name)))
        {
        }


        [Setting]
        [DefaultValue(false)]
        [Category("Settings DISPELLS")]
        [DisplayName("Use Dispell ")]
        [Description("enable/diable dispell")]
        public bool UseDispell { get; set; }

        [Setting]
        [DefaultValue(28)]
        [Category("Settings PULL")]
        [DisplayName("PullDistance")]
        [Description("Distance to pull from")]
        public float PullDistance { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings INTERRUPT")]
        [DisplayName("autointerrupt")]
        [Description("Cast WindShear if target casting")]
        public bool AutoInterrupt { get; set; }

        [Setting]
        [DefaultValue(0)]
        [Category("Settings REST")]
        [DisplayName("Eat hp%")]
        [Description("Eat at % hp")]
        public int HealthPercent { get; set; }

        

        public enum CDUseType
        {
            COOLDOWN,
            BOSS,
            MANUAL
        }

        public enum LethalPoisonType
        {
            AUTO,
            DEADLY,
            WOUND
        }

        public enum NonLethalPoisonType
        {
            AUTO,
            CRYPPLING,
            MINDNUMBING,
            LEECHING,
            PARALITYC
        }

        public enum AnticipationFinalBuffType
        {
            DEEP_INSIGHT_BUFF,
            MODERATE_INSIGHT_BUFF,
            SHALLOW_INSIGHT_BUFF,
            NO_INSIGHT_BUFF
        }

        [Setting]
        [DefaultValue(80)]
        [Category("Settings DEFENSIVE_CD")]
        [DisplayName("CoSHP")]
        [Description("CoSHP")]
        public int  CoSHP { get; set; }

        [Setting]
        [DefaultValue(40)]
        [Category("Settings DEFENSIVE_CD")]
        [DisplayName("EvasionHP")]
        [Description("EvasionHP")]
        public int  EvasionHP{ get; set; }

        [Setting]
        [DefaultValue(80)]
        [Category("Settings DEFENSIVE_CD")]
        [DisplayName("CombatReadinessHP")]
        [Description("CombatReadinessHP")]
        public int CombatReadinessHP { get; set; }

        [Setting]
        [DefaultValue(CDUseType.COOLDOWN)]
        [Category("Settings CD")]
        [DisplayName("UseCD")]
        [Description("Chose when use CD")]
        public CDUseType CDUse { get; set; }

        [Setting]
        [DefaultValue(AnticipationFinalBuffType.DEEP_INSIGHT_BUFF)]
        [Category("Settings ANTICIPATION")]
        [DisplayName("TryConserveAnticipationUntil")]
        [Description("TryConserveAnticipationUntil if we have at least specified insight bugg")]
        public AnticipationFinalBuffType TryConserveAnticipationUntil { get; set; }

        [Setting]
        [DefaultValue(LethalPoisonType.AUTO)]
        [Category("Settings POISONS")]
        [DisplayName("LethalPoisonType")]
        [Description("LethalPoisonType to apply")]
        public LethalPoisonType LethalPoisonTypeToApply { get; set; }

        [Setting]
        [DefaultValue(NonLethalPoisonType.AUTO)]
        [Category("Settings POISONS")]
        [DisplayName("NonLethalPoisonType")]
        [Description("NonLethalPoisonType to apply")]
        public NonLethalPoisonType NonLethalPoisonTypeToApply { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings SPECIAL")]
        [DisplayName("Stay Stealth")]
        [Description("Stay Stealth")]
        public bool StayStealth { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings SPECIAL")]
        [DisplayName("use shadowstep")]
        [Description("use shadowstep if talented")]
        public bool UseShadowStep { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings SPECIAL")]
        [DisplayName("useRupture")]
        [Description("useRupture")]
        public bool UseRupture { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Settings SPECIAL")]
        [DisplayName("RuptureAlwaysUP")]
        [Description("RuptureAlwaysUP if target timeto die >= 26 sec")]
        public bool RuptureAlwaysUP { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings SPECIAL")]
        [DisplayName("AutoUseVanish for free ambush")]
        [Description("AutoUseVanish for free ambush")]
        public bool AutoUseVanish { get; set; }
        

        [Setting]
        [DefaultValue(true)]
        [Category("Settings SPECIAL")]
        [DisplayName("UseRedirect")]
        [Description("enable/disable use of redirect")]
        public bool UseRedirect { get; set; }

        [Setting]
        [DefaultValue(40)]
        [Category("Settings SPECIAL")]
        [DisplayName("Recuperate HP")]
        [Description("use recuperate if HP lower than this percentage (set 0 to not use recuperate)")]
        public int RecuperateHP { get; set; }

        [Setting]
        [DefaultValue(20)]
        [Category("Settings SPECIAL")]
        [DisplayName("KillingSpeeAtEnergy")]
        [Description("KillingSpeeAtEnergyLower than this value")]
        public int KillingSpeeAtEnergy { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings SPECIAL")]
        [DisplayName("UseKillingSpee")]
        [Description("UseKillingSpee")]
        public bool UseKillingSpee { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings AOE")]
        [DisplayName("EnableAOE")]
        [Description("Enable/Disable AOE Spells")]
        public bool EnableAOE { get; set; }

        [Setting]
        [DefaultValue(3)]
        [Category("Settings AOE")]
        [DisplayName("BladeFlurryNum")]
        [Description("Enable Blade flurry on number of mobs greater than this value")]
        public int BladeFlurryNum { get; set; }

        [Setting]
        [DefaultValue(5)]
        [Category("Settings AOE")]
        [DisplayName("FanOfKnivesNum")]
        [Description("Enable Fan Of Knives on number of mobs greater than this value")]
        public int FanOfKnivesNum { get; set; }

        [Setting]
        [DefaultValue(8)]
        [Category("Settings AOE")]
        [DisplayName("CrimsonTempestNum")]
        [Description("Enable Crimson Tempest on number of mobs greater than this value")]
        public int CrimsonTempestNum { get; set; }

        

        [Setting]
        [DefaultValue(true)]
        [Category("Settings MOVEMENT")]
        [DisplayName("AutoFacingTarget")]
        [Description("Enable/Disable autofacing current target")]
        public bool AutofaceTarget { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings MOVEMENT")]
        [DisplayName("Auto burst speed")]
        [Description("Auto use burst speed")]
        public bool AutoSpeed { get; set; }

        [Setting]
        [DefaultValue(15)]
        [Category("Settings MOVEMENT")]
        [DisplayName("Auto burst speed range")]
        [Description("Auto use burst speed if enemy distance greater than this value")]
        public int AutoSpeedRange { get; set; }

        public enum TargetType
        {
            MANUAL,
            SEMIAUTO,
            AUTO
        }

        [Setting]
        [DefaultValue(TargetType.AUTO)]
        [Category("Settings TARGETTING")]
        [DisplayName("TargetTypeSelected")]
        [Description("AUTO/MANUAL enable/disable autotargeting SEMIAUTO: same logic of AUTO but no switch selected target")]
        public TargetType TargetTypeSelected { get; set; }
        
    }
}